/*
 * CharacterStatistics.java
 *
 * Created on May 1, 2008, 1:03 AM
 */

package RPack;

import java.io.*;
import java.util.*;
import java.*;


/**
 *
 * @author  Administrator
 */

class Statistic{
    public static int hitpoints;
    public static int manapoints;
    public static int power;
    public static int aegis;
    public static int speed;
    public static int arcana;
    public static int battlenumber;
    public static int wins;
    public static int losses;
    public static int saves;
}

public class CharacterStatistics extends javax.swing.JFrame {
    
    /** Creates new form CharacterStatistics */
    public CharacterStatistics() {
        initComponents();
    }
    
                public void run() {
                    new CharacterStatistics().setVisible(true);
                 /*   Statistic.hitpoints = hitpoints;
                    Statistic.manapoints = manapoints;
                    Statistic.power = power;
                    Statistic.aegis = aegis;
                    Statistic.speed = speed;
                    Statistic.arcana = arcana;
                    Statistic.battlenumber = battlenumber;
                    Statistic.wins = wins;
                    Statistic.losses = losses;
                    Statistic.saves = saves;*/
                    
                 
                }
                
 
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        HP = new javax.swing.JLabel();
        MP = new javax.swing.JLabel();
        Pow = new javax.swing.JLabel();
        Aeg = new javax.swing.JLabel();
        Spd = new javax.swing.JLabel();
        Arc = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        Bat = new javax.swing.JLabel();
        Won = new javax.swing.JLabel();
        Los = new javax.swing.JLabel();
        Sav = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                formFocusGained(evt);
            }
        });

        jLabel1.setText("+ Character Statistics +");

        HP.setText("Hit Point Total");

        MP.setText("Mana Point Total");

        Pow.setText("Power");

        Aeg.setText("Aegis");

        Spd.setText("Speed");

        Arc.setText("Arcana");

        jLabel8.setText("+ Adventure Statistics +");

        Bat.setText("Battles");

        Won.setText("Won");

        Los.setText("Lost");

        Sav.setText("Saves");

        jButton1.setText("Exit");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Update");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jLabel8)
                            .add(layout.createSequentialGroup()
                                .add(10, 10, 10)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                    .add(Bat)
                                    .add(Sav)
                                    .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .add(layout.createSequentialGroup()
                                        .add(2, 2, 2)
                                        .add(Los))
                                    .add(Won, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 83, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 26, Short.MAX_VALUE)))
                        .addContainerGap(123, Short.MAX_VALUE))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel1)
                            .add(layout.createSequentialGroup()
                                .add(10, 10, 10)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(MP)
                                    .add(HP)
                                    .add(Pow)
                                    .add(Aeg)
                                    .add(Spd)
                                    .add(Arc))))
                        .add(39, 39, 39)
                        .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 77, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(HP)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(MP)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Pow)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Aeg)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Spd)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Arc)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel8)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Bat)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Won)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Los)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(Sav)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 21, Short.MAX_VALUE)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton1)
                    .add(jButton2))
                .addContainerGap())
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
        HP.setText("Hit Point Total: " + Dungeon.hitpoints+ "/" +Dungeon.hitpointsmax);
        MP.setText("Mana Point Total: " + Dungeon.manapoints+ "/" +Dungeon.manapointsmax);
        Pow.setText("Power: " + Dungeon.power);
        Aeg.setText("Aegis: " + Dungeon.aegis);
        Spd.setText("Speed: " + Dungeon.speed);
        Arc.setText("Arcana: " + Dungeon.arcana);
        Bat.setText("Battles: " + Dungeon.battlenumber);
        Won.setText("Won: " + Dungeon.wins);
        Los.setText("Lost: " + Dungeon.losses);
        Sav.setText("Saves: " + Dungeon.saves);
    }//GEN-LAST:event_jButton2ActionPerformed

    private void formFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_formFocusGained
// TODO add your handling code here:
      
    }//GEN-LAST:event_formFocusGained

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
        setVisible(false);
    }//GEN-LAST:event_jButton1ActionPerformed
    
    /**
     * @param args the command line arguments
     */
      public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CharacterStatistics().setVisible(true);
           //     jLabel2.setText("Hit Point Total: " + hitpoints);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Aeg;
    private javax.swing.JLabel Arc;
    private javax.swing.JLabel Bat;
    private javax.swing.JLabel HP;
    private javax.swing.JLabel Los;
    private javax.swing.JLabel MP;
    private javax.swing.JLabel Pow;
    private javax.swing.JLabel Sav;
    private javax.swing.JLabel Spd;
    private javax.swing.JLabel Won;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel8;
    // End of variables declaration//GEN-END:variables
    
}
